﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using CarLoanSystem.Entity;

namespace CarLoanSystem
{
    public partial class frmAddCarBrand : Form
    {
        public frmAddCarBrand()
        {
            InitializeComponent();
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void btnSave_Click(object sender, EventArgs e)
        {
            CarBrandItem carBrandItem = new CarBrandItem();
            carBrandItem.CAR_BRAND_NAME = this.txtBrandName.Text;
            DAL.CarBrandInfoDAL.Insert(carBrandItem);
            MessageBox.Show("บันทึกข้อมูลเรียบร้อย", "ข้อมูลยี่ห้อรถยนต์");
            this.Close();
        }
    }
}
